#ifndef TOKENBLOCK_H
#define TOKENBLOCK_H

#include "symbol.hpp"
#include <stdio.h>

typedef enum {
  PUNCTUATION,
  NUMBER_LETTER,
  BLANK,
  ILLEGAL,
} CharType;

struct TokenBlock {
  SymbolType sym;
  char *token;
  struct TokenBlock *nextBlock;
};

struct TokenBlock *malloc_TokenBlock(int char_len);

void free_TokenBlock(struct TokenBlock *ptr);

void free_TokenList(struct TokenBlock *ptr);

SymbolType determine_symbol_type(const char *token);

void type_token_list(struct TokenBlock *head);

struct TokenBlock *append_token(struct TokenBlock *tail_ptr, const char buf[]);

struct TokenBlock *get_tokens(FILE *fp);

struct TokenBlock *get_typed_tokens(FILE *fp);

#endif // !TOKENBLOCK
